<!DOCTYPE html>
<meta charset="utf-8">
<#include "../../business/common/common.ftl"/>

<style>
    div {
        overflow: scroll;
    }

</style>
<div class="layui-fluid">
    <table class="layui-table table" style="text-align: center;" id="dataTable" tableType="dataTable">
        <tr class="layui-bg-gray">
            <th style="text-align: center;" rowspan="2" width="3%">序号</th>
            <th style="text-align: center;" rowspan="2">征收项目名称</th>
            <th style="text-align: center;" colspan="2">房源签认</th>
            <th style="text-align: center;">财务复核</th>
            <th style="text-align: center;">选房签约</th>
            <th style="text-align: center;" colspan="2">款项结清</th>
            <th style="text-align: center;">档案发放</th>
            <th style="text-align: center;" colspan="2">交房情况</th>
        </tr>
        <tr class="layui-bg-gray">
            <th style="text-align: center;" width="8%">&#160;&#160;&#160;户数&#160;&#160;&#160;</th>
            <th style="text-align: center;" width="8%">&#160;&#160;&#160;套数&#160;&#160;&#160;</th>
            <th style="text-align: center;" width="8%">户数</th>
            <th style="text-align: center;" width="8%">户数</th>
            <th style="text-align: center;" width="12%">户数【未结清/已结清(款项)/部分结清】</th>
            <th style="text-align: center;" width="8%">套数【未结清/已结清】</th>
            <th style="text-align: center;" width="8%">户数</th>
            <th style="text-align: center;" width="8%">&#160;&#160;&#160;户数&#160;&#160;&#160;</th>
            <th style="text-align: center;" width="8%">&#160;&#160;&#160;套数&#160;&#160;&#160;</th>
        </tr>
    <#assign index = 0/>
    <#assign allContractChooseHouseStatusCountSum = 0/>
    <#assign allHouseChooseHouseStatusCountSum = 0/>

    <#assign AllContractFinanceCheckStatusCountSum = 0/>
    <#assign allContractAzSignStatusCountSum = 0/>

    <#assign allContractFinanceSettleStatus1CountSum = 0/>
    <#assign allContractFinanceSettleStatus2CountSum = 0/>
    <#assign allContractFinanceSettleStatus2MoneySum = 0/>
    <#assign allContractFinanceSettleStatus3CountSum = 0/>
    <#assign allHouseFinanceSettleStatus1CountSum = 0/>
    <#assign allHouseFinanceSettleStatus2CountSum = 0/>

    <#assign allContractDaffStatusCountSum = 0/>

    <#assign allContractTakeHouseStatusCountSum = 0/>
    <#assign allHouseTakeHouseStatusCountSum = 0/>


    <#if zsProjectList?size !=0>
        <#list zsProjectList as zsProject>
            <#assign contractCountMap = (contractMap[zsProject.id?c])!/>
            <#assign houseCountMap = (houseMap[zsProject.id?c])!/>
            <#assign carLotCountMap = (carLotMap[zsProject.id?c])!/>
            <#assign storageRoomCountMap = (storageRoomMap[zsProject.id?c])!/>

            <#assign allContractChooseHouseStatusCountSum = allContractChooseHouseStatusCountSum + (contractCountMap['chooseHouseStatusCount'])!0/>
            <#assign allHouseChooseHouseStatusCountSum = allHouseChooseHouseStatusCountSum + (houseCountMap['chooseHouseStatusCount'])!0/>
            <#assign AllContractFinanceCheckStatusCountSum = AllContractFinanceCheckStatusCountSum + (contractCountMap['financeCheckStatusCount'])!0/>
            <#assign allContractAzSignStatusCountSum = allContractAzSignStatusCountSum + (contractCountMap['azSignStatusCount'])!0/>
            <#assign allContractFinanceSettleStatus1CountSum = allContractFinanceSettleStatus1CountSum + (contractCountMap['financeSettleStatus1Count'])!0/>
            <#assign allContractFinanceSettleStatus2CountSum = allContractFinanceSettleStatus2CountSum + (contractCountMap['financeSettleStatus2Count'])!0/>
            <#assign allContractFinanceSettleStatus2MoneySum = allContractFinanceSettleStatus2MoneySum + (contractCountMap['financeSettleStatus2Money'])!0/>
            <#assign allContractFinanceSettleStatus3CountSum = allContractFinanceSettleStatus3CountSum + (contractCountMap['financeSettleStatus3Count'])!0/>
            <#assign allHouseFinanceSettleStatus1CountSum = allHouseFinanceSettleStatus1CountSum + (houseCountMap['financeSettleStatus1Count'])!0/>
            <#assign allHouseFinanceSettleStatus2CountSum = allHouseFinanceSettleStatus2CountSum + (houseCountMap['financeSettleStatus2Count'])!0/>
            <#assign allContractDaffStatusCountSum = allContractDaffStatusCountSum + (contractCountMap['daffStatusCount'])!0/>
            <#assign allContractTakeHouseStatusCountSum = allContractTakeHouseStatusCountSum + (contractCountMap['takeHouseStatusCount'])!0/>
            <#assign allHouseTakeHouseStatusCountSum = allHouseTakeHouseStatusCountSum + (houseCountMap['takeHouseStatusCount'])!0/>
            <#assign index = index+1 />

            <tr <#if index%10 lte 5 && index%10 gt 0>style="background-color: #FFCC99"</#if>>
                <td>${(index)!0}</td>
                <td>
                    ${(zsProject.projectName)!}</a>
                </td>
                <td>${(contractCountMap['chooseHouseStatusCount'])!0}</td>
                <td>${(houseCountMap['chooseHouseStatusCount'])!0}</td>
                <td>${(contractCountMap['financeCheckStatusCount'])!0}</td>
                <td>${(contractCountMap['azSignStatusCount'])!0}</td>
                <td>
                    【${(contractCountMap['financeSettleStatus1Count'])!0}】/【${(contractCountMap['financeSettleStatus2Count'])!0}(${(contractCountMap['financeSettleStatus2Money'])!0})】/【${(contractCountMap['financeSettleStatus3Count'])!0}】
                </td>
                <td>
                    【${(houseCountMap['financeSettleStatus1Count'])!0}】/【${(houseCountMap['financeSettleStatus2Count'])!0}】
                </td>
                <td>${(contractCountMap['daffStatusCount'])!0}</td>
                <td>${(contractCountMap['takeHouseStatusCount'])!0}</td>
                <td>${(houseCountMap['takeHouseStatusCount'])!0}</td>

            </tr>
        </#list>
    </#if>
        <tr>
            <td colspan="2">合计</td>
            <td>${allContractChooseHouseStatusCountSum}</td>
            <td>${allHouseChooseHouseStatusCountSum}</td>
            <td>${AllContractFinanceCheckStatusCountSum}</td>
            <td>${allContractAzSignStatusCountSum}</td>
            <td>
                【${allContractFinanceSettleStatus1CountSum}】/【${allContractFinanceSettleStatus2CountSum}(${allContractFinanceSettleStatus2MoneySum})】/【${allContractFinanceSettleStatus3CountSum}】
            </td>
            <td>【${allHouseFinanceSettleStatus1CountSum}】/【${allHouseFinanceSettleStatus2CountSum}】</td>
            <td>${allContractDaffStatusCountSum}</td>
            <td>${allContractTakeHouseStatusCountSum}</td>
            <td>${allHouseTakeHouseStatusCountSum}</td>

        </tr>
    </table>
</div>

